package com.selangshiwo.sina.requst;

public class WeiboSendMsgRequestPack extends RequestPack implements IRequestPack {
	
	public WeiboSendMsgRequestPack(){
		super("post" , REQUEST_URL.WEIBOSENDMSG.toStringWithTS());
	}
	
	public void setMsgContent(String text) throws Exception{
		if(text.length() > 140)
			throw new Exception("微博内容不可以超过140个汉字,已超出:" + (text.length() - 140));
		
		setParam("text", text) ;
		
	}
	
	public void setDefaultParams(){	
		//当前参数仅针对文本微博
		setParam("_surl", "");
		setParam("_t", "0");
		setParam("location", "home");
		setParam("module", "stissue");
		setParam("pic_id", "");			//绑定图片的id
		setParam("rank", "");
	}
	
}
